
		<div id="gadget_1">
		<?php
	include('gadget.php');
	include('parserXML.php');
	
	$wID = 1;
	
	$rez = findGadget("ID", $wID);
	
?>
			<span class="gadget_head"><?php  print($rez[0]->vrsta." / ".$rez[0]->proizvajalec." / ".$rez[0]->model);?></span>

			<div id="tabs">
				<ul>
					<li><a href="#fragment-1"><span>Osnovni opis</span></a></li>
					<li><a href="#fragment-2"><span>Tehnicni podatki</span></a></li>
					<li><a href="#fragment-3"><span>Slike</span></a></li>
					<li><a href="#fragment-4"><span>Preizkusi</span></a></li>
				</ul>

				<div id="fragment-1" class="tab_panel">
				<p><?php //print("<p>Pozdravljen ".$_SESSION['user'].", tvoj SID je ".$_COOKIE['SID']."</p>");	?></p>
					<p> <?php  print($rez[0]->opis); ?>
					</p>
					<h3 class="comments_title">KOMENTARJI UPORABNIKOV</h3>
					<div id="komentarji_uporabnikov">
						<p class="comment_head">Janez wrote...</p>
						<p class="comment_body">Ta izdelek je odlicen!<br /></p>
					</div>
				</div>


				<div id="fragment-2" class="tab_panel">
					<table border="1">
						<tr>
							<td>Dimenzije</td>
							<td><?php $dim = getAttribute($wID, "lastnosti", "dimenzije"); print($dim[0]);?></td>
						</tr>
						<tr>
							<td>Barva</td>
							<td><?php $bar = getAttribute($wID, "lastnosti", "barva"); print($bar[0]);?></td>
						</tr>
						<tr>
							<td>Teža</td>
							<td><?php $teza = getAttribute($wID, "lastnosti", "gteza"); print($teza[0]);?></td>
						</tr>
						<tr>
							<td>Cena</td>
							<td><?php $cena = getAttribute($wID, "lastnosti", "cena"); print($cena[0]);?></td>
						</tr>
					</table>
				</div>
				
				<div id="fragment-3" class="tab_panel">
					<div id="gallery">
						<ul>
							<?php				
								$slika = getAttribute($wID, "slika", "link");				
								foreach ($slika as $pic)
									print('<li><a href="photos/'.$pic.'" title="Slika 1"> <img src="photos/'.$pic.'" width="74" height="74" alt="" /></a></li>');
							?>
						</ul>
					</div>
				</div>


				<div id="fragment-4" class="tab_panel">
								<?php 

									$preizkusevalec = getReview($wID, "reviews", "review", "preizkusevalec");
									$sttesta = getReview($wID, "reviews", "review", "sttesta");
									$ocena = getReview($wID, "reviews", "review", "ocena");
									
									$count = count($preizkusevalec);
									for ($i = 0; $i < $count; $i++) {
    									print("<b>Tester: </b>$preizkusevalec[$i] <br />");
    									print("<b>Stevilka testa: </b>$sttesta[$i] <br />");
    									print("<b>Ocena: </b>$ocena[$i] <br />");
    									print("<hr />");
									}
																
								?>
				</div>
			</div>            
		</div>
	